/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.ucase.casemain.service;

import com.icinfo.cloud.provider.punish.approval.dto.AuditDetailDocumentQueryDto;
import com.icinfo.cloud.provider.punish.common.sign.dto.SignAttachmentFileSaveDto;
import com.icinfo.cloud.provider.punish.common.sign.dto.SignCaseSourceReceiveDto;
import com.icinfo.cloud.provider.punish.common.sign.dto.SignReceiveDto;
import com.icinfo.cloud.provider.punish.common.sign.vo.DocAttachmentsVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.AppendixRecordDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseAppendixQueryDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseAttachmentInfoQueryDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseStageAppendixSaveDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.model.CaseAppendixRecord;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseAttachmentInfoVo;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * 描述: 案件附件表-trj case_appendix_record 对应的Service接口.<br>
 *
 * @author framework generator
 * @date 2022年02月25日
 */
public interface ICaseAppendixRecordService extends BaseService {


    /**
     *  生成附件表---公用方法
     * @author lxj
     * @date  2022/2/25
     * @param caseAppendixRecord 入参
     * @return boolean
     **/
    boolean saveCaseAppendixRecord(CaseAppendixRecord caseAppendixRecord);

    /**
     * 查询文书关联附件
     * @author cyy
     * @date  2022/2/25
     * @param auditDetailDocumentQueryDto 入参
     * @return
     **/
    List<DocAttachmentsVo> getDocLinkAttachments(AuditDetailDocumentQueryDto auditDetailDocumentQueryDto);

    /**
     * 查询文书关联附件
     * @author cyy
     * @date  2022/2/26
     * @param signReceiveDto 入参
     * @return
     **/
    Map<String,Object> saveOfflineSignFile(SignReceiveDto signReceiveDto);

    /**
     * 【V1.0.0】描述：获取案件附件列表
     *
     * @param queryDto {@link CaseAttachmentInfoQueryDto}
     * @return {@link List<CaseAttachmentInfoVo>} 案件附件列表
     * @author xiangyuyu
     * @date 2022-02-27 09:49
     */
    List<CaseAttachmentInfoVo> getCaseAttachmentList(CaseAttachmentInfoQueryDto queryDto);

    /**
     * 【V1.0.0】描述：根据唯一标识查询案件附件信息
     *
     * @param id 唯一标识
     * @return {@link CaseAttachmentInfoVo} 案件附件信息
     * @author xiangyuyu
     * @date 2022-02-27 09:49
     */
    CaseAttachmentInfoVo getCaseAttachmentInfo(String id);


    /**
     * 【V1.0.0】描述：删除案件关联附件
     *
     * @param id 唯一标识
     * @return {@link Result <String>} 删除结果
     * @author xiangyuyu
     * @date 2022-03-07 13:47
     */
    Result<String> removeCaseAttachment(String id);
    /**
     * 根据案件id与文书目录编码删除关联附件
     * @author liyafeng
     * @date 2022/3/30
      * @param caseId
     * @param documentCatalogCode
     * @return
     */
    void removeCaseAppendixRecordByCaseIdAndCatalogCode(String caseId, String documentCatalogCode);

    /**
     * 描述：获取案件相关附件列表
     *
     * @param queryDto {@link CaseAttachmentInfoQueryDto}
     * @return {@link List<CaseAttachmentInfoVo>} 案件相关附件列表
     * @author xiangyuyu
     * @date 2022-04-09 15:26
     */
    List<CaseAttachmentInfoVo> getCaseAttachmentInfoList(CaseAttachmentInfoQueryDto queryDto);
    /**
     *根据案件id、文书目录编码、当事人id删除关联附件
     * @author liyafeng
     * @date 2022/5/23
      * @param caseId
     * @param docCatalogCode
     * @param partyId
     * @return
     */
    void removeCaseAppendixRecordByCaseIdAndCatalogCodeAndPartyId(String caseId, String docCatalogCode, String partyId);

    /**
     * 【V1.3.0】描述：根据环节编码撤回附件数据
     * @author tianrunjia
     * @date 2022-06-27
     * @return
     */
    void recallCaseAppendixRecordByCaseLinkCode(String caseId, String caseLinkCode);
    /**
     * 上传线下已签署文书-案源
     * @author liyafeng
     * @date 2022/8/18
      * @param signReceiveDto
     * @return {@link Map< Object, Object>}
     */
    int saveOfflineSignFile(SignCaseSourceReceiveDto signReceiveDto);

    /**
     * 上传签字附属文件
     *
     * @param saveDto 保存dto
     * @return int
     * @author shishengyao
     * @date 2022/10/26
     */
    int saveSignAttachmentFile(SignAttachmentFileSaveDto saveDto);

    /**
     * 根据案件id、文书目录编码、当事人id附件类型删除关联附件
     *
     * @param map 地图
     * @author shishengyao
     * @date 2022/11/18
     */
    void removeCaseAppendixRecordByAppendixTypeId(Map<String, Object> map);
    
    /**
     * @description 附件管理-保存更新附件
     * @param caseStageAppendixSaveDto
     * @return: com.icinfo.framework.common.web.Result<java.lang.String>
     * @author sunjiefei
     * @date 2023-04-06
     */
    Result<String> saveCaseAttachmentInfo(CaseStageAppendixSaveDto caseStageAppendixSaveDto);

    /**
     * @description 附件管理-查询附件
     * @param caseAppendixQueryDto
     * @return: java.util.List<com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseAttachmentInfoVo>
     * @author sunjiefei
     * @date 2023-04-06
     */
   List<CaseAttachmentInfoVo> getCaseAttachments(CaseAppendixQueryDto caseAppendixQueryDto);
}
